package db.dao;

import db.dto.*;
import db.exceptions.*;

public interface DrugDoseDao
{
	/** 
	 * Inserts a new row in the DRUG_DOSE table.
	 */
	public int insert(DrugDoseDto dto) throws DrugDoseDaoException;

	/** 
	 * Updates a single row in the DRUG_DOSE table.
	 */
	public void update(int pk, DrugDoseDto dto) throws DrugDoseDaoException;

	/** 
	 * Deletes a single row in the DRUG_DOSE table.
	 */
	public void delete(int pk) throws DrugDoseDaoException;

	/** 
	 * Returns the rows from the DRUG_DOSE table that matches the specified primary-key value.
	 */
	public DrugDoseDto findByPrimaryKey(int pk) throws DrugDoseDaoException;

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the criteria ''.
	 */
	public DrugDoseDto[] findAll() throws DrugDoseDaoException;

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the criteria 'ID_DRUG = :idDrug'.
	 */
	public DrugDoseDto[] findByDrugs(int idDrug) throws DrugDoseDaoException;

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the criteria 'ID_PRESCRIPTION = :idPrescription'.
	 */
	public DrugDoseDto[] findByPrescription(int idPrescription) throws DrugDoseDaoException;

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the criteria 'ID_DRUGDOSE = :idDrugdose'.
	 */
	public DrugDoseDto[] findWhereIdDrugdoseEquals(int idDrugdose) throws DrugDoseDaoException;

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the criteria 'ID_DRUG = :idDrug'.
	 */
	public DrugDoseDto[] findWhereIdDrugEquals(int idDrug) throws DrugDoseDaoException;

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the criteria 'ID_PRESCRIPTION = :idPrescription'.
	 */
	public DrugDoseDto[] findWhereIdPrescriptionEquals(int idPrescription) throws DrugDoseDaoException;

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the criteria 'WEIGTH = :weigth'.
	 */
	public DrugDoseDto[] findWhereWeigthEquals(double weigth) throws DrugDoseDaoException;

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the criteria 'PERIOD = :period'.
	 */
	public DrugDoseDto[] findWherePeriodEquals(long period) throws DrugDoseDaoException;

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the criteria 'TERM = :term'.
	 */
	public DrugDoseDto[] findWhereTermEquals(long term) throws DrugDoseDaoException;

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the criteria 'COMMENT = :comment'.
	 */
	public DrugDoseDto[] findWhereCommentEquals(String comment) throws DrugDoseDaoException;

	/** 
	 * Sets the value of maxRows
	 */
	public void setMaxRows(int maxRows);

	/** 
	 * Gets the value of maxRows
	 */
	public int getMaxRows();

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the specified arbitrary SQL statement
	 */
	public DrugDoseDto[] findByDynamicSelect(String sql, Object[] sqlParams) throws DrugDoseDaoException;

	/** 
	 * Returns all rows from the DRUG_DOSE table that match the specified arbitrary SQL statement
	 */
	public DrugDoseDto[] findByDynamicWhere(String sql, Object[] sqlParams) throws DrugDoseDaoException;

}
